namespace DDD.Framework
{
    public abstract class DomainEntity<IdentityType> : DomainObject
    {
        private IdentityType identity = default(IdentityType);

        public virtual IdentityType Identity
        {
            get { return identity; }
        }

        public bool IsTransient()
        {
            return Identity == null || Identity.Equals(default(IdentityType));
        }
    }
}